package com.zxp.myRule;

import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description: 切换负载均衡的方式，使用随机，默认使用轮训
 * @author: 张新朋
 * @time: 2020/5/3 23:32
 */
@Configuration
public class MySelfRule {
    @Bean
    public RandomRule getRandomRule(){
        return new RandomRule();
    }
}